<?php
/**
 * Created by PhpStorm.
 * User: 96572
 * Date: 2017/5/21
 * Time: 15:49
 */
use app\common\CommonController;
?>
<?php if($menu['menu_is_lowest'] == 0){ ?>
    <fieldset class="layui-elem-field">
        <legend><?=$menu['menu_label']?></legend>
        <div class="row layui-field-box" style="margin-left: 2px;">
            <?=$child?>
        </div>
    </fieldset>
<?php }else{ ?>
    <?php $name = CommonController::getPermissionNameByRoute($menu['menu_module_id'],$menu['menu_controller_id'],$menu['menu_action_id']); ?>
            <input type="checkbox" name="name[]"  value="<?=$name?>" title="<?=$menu['menu_label']?>" <?=in_array($name,$rolePermissions) ? 'checked' : ''?>>
<?php } ?>

